var app = getApp()
const Constants = require('../../utils/constants');
const Util = require('../../utils/util');
const Auth = require('../../utils/auth');
const Api = require('../../utils/api.js');
const Rest = require('../../utils/rest');
const util = require('../../utils/util.js');
Page({
  data: {
      version: "2.6.8",
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
    return {
        title: '更新日志',
        path: 'pages/log/log',
        imageUrl: '',
    }
},
/*分享朋友圈自定义*/ 
onShareTimeline(res){
console.log(res)
return {
  title: '更新日志',
  path: 'pages/log/log',
  imageUrl:''
}

},
  onLoad: function(options) {
    let that = this;
    wx.request({
      url: 'https://www.mtyyk.com/wp-content/plugins/jiangqie-api/log_api/log.json',
      header: {
        'content-type': 'application/json'
      },
      success: function (res) {
        console.log(res.data.result)
        that.setData(
          {
            loglist: res.data.result
          }
        )
      }
    }) 
    Rest.get(Api.JIANGQIE_SETTING_log).then(res => {
      that.setData({
          setting: {
              background: res.data.background ? res.data.background : that.default.background,
              tite: res.data.title ? res.data.title : that.default.title,
              description: res.data.description ? res.data.description : that.default.description,
          }
      });
  })
  this.setData({
    titleName: getApp().appName
});    
  }
})